<template>
  <section class="trust-us">
    <div class="container">
      <div class="row">
        <div class="col-sm-12 text-center m-b-20">
          <h1>{{t('trust')}}</h1>
        </div>
      </div>
      <div class="row client-row client-big p-b-30">
        <b-skeleton class='col-md-2 col-xs-4' v-for="img in imgList" width="195px" height="165px"
          :loading="allLoading">
          <div>
            <img :src="img.url">
          </div>
        </b-skeleton>
      </div>
    </div>
  </section>
</template>

<script lang="ts">
  /** lib **/
  import {
    useI18n
  } from 'vue-i18n'
  /** components **/
  import bSkeleton from '../../../components/bSkeleton.vue'
  /** logic **/
  import useImgLoading from './img-loading' // img-loading
  export default {
    components: {
      bSkeleton
    },
    props: {
      imgs: {
        type: Array,
        default: () => {
          return []
        }
      }
    },
    setup(prop: any) {
      return {
        ...useImgLoading(prop.imgs),
        ...useI18n({
          inheritLocale: true
        })
      }
    }

  }
</script>

<i18n>
  {
  "zh":{
  "trust": "合作伙伴"
  },
  "en": {
  "trust": "They trust us"
  },
  "ja": {
  "trust": "パートナー"
  }
  }
</i18n>

<style scoped>
  section {
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    padding-bottom: 80px;
  }

  .m-b-20 {
    margin-bottom: 20px;
  }

  .p-b-30 {
    padding-bottom: 30px !important;
  }

  .client-row {
    overflow: hidden;
    text-align: center;
    line-height: 0;
  }

  .client-big img {
    max-height: 100%;
    max-width: 100%;
    filter: grayscale(100%);
  }

  .client-row img {
    opacity: 0.6;
    filter: grayscale(100%);
  }

  .client-big img:hover {
    max-height: 100%;
    max-width: 100%;
    filter: grayscale(0);
    transition: .3s;
  }

  .client-row img:hover {
    opacity: 1.0;
  }
</style>